package com.zzl.boot.bigevent.pojo;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzl.boot.bigevent.anno.State;
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.groups.Default;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import java.time.LocalDateTime;

@Data
public class comment {
    @NotNull(groups = comment.update.class)
    private Integer id;//主键ID
    @NotEmpty
    private String content;//评论内容
    @NotEmpty
    private String author;
    @NotNull
    private Integer articleId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;//创建时间
    private Integer parentId;
    private String userPic;//用户头像地址
    //@Validated校验的分组
    public interface add extends Default {}
    public interface update extends Default {}
}

